#include "Vector2.h"
#include "IoVector2.h"
#include "Platform.h"
#include <iostream>

namespace Tests {
	// Bob Burqawitz:
	// Testing reflection of 2d vectors
	void reflection() {
		using namespace std;
		typedef Vector2 V;
		typedef pair<V,V> T; // Direction and normal pair

		// Construct tests
		static const T tests[] = {
			T( V( 1, 0 ),  V( -1,  0 ) ),
			T( V( 1, 0 ),  V(  1,  0 ) ),
			T( V( 1, 0 ),  V(  1,  1 ) ),
			T( V( 1, 0 ), -V(  1,  1 ) ),
			T( V( 1, 0 ),  V(  1,  1 ).normalized() ),
			T( V( 1, 0 ), -V(  1,  1 ).normalized() )
		};

		// Output results
		FOR ( const T& test, tests ) {
			// using namespace Formatter::Text;
			V result = test.first.reflected( test.second );
			cout << test.first << " reflect " << test.second << " = " << result << endl;
		}
	}
}